
function post(url, params, cb) {  
  $.ajax({
    type: "post",
    url: url,
    data: JSON.stringify(params),
    dataType: "json",
    contentType:"application/json;charset=UTF-8",
    beforeSend:function(){
      console.log('开始发送请求');
    },  
    success: function (response) {
      console.log('返回数据');
      cb(response);
    },
    complete:function(){
      console.log('ajax请求完成');
    }
  });
}